﻿namespace NTLib.Wpf.AppTester
{
    using Application.ViewModels;
    using Core.Timers;
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using WPF.Attributes;

    public class TestVM : BaseViewModel
    {
        #region Fields

        private string _test;
        private StringComparison _comp;
        private double _percent;

        #endregion

        #region Ctor

        public TestVM()
        {
            Timer timer = new Timer(TimeSpan.FromSeconds(1));
            timer.Elapsed += (e) => Test = DateTime.Now.ToString();
            timer.Start();
        }

        #endregion

        #region Properties

        /// <summary>
        /// Gets or sets the test.
        /// </summary>
        [PropertyExposed(Name = "Poney")]
        public string Test
        {
            get { return this._test; }
            set { this.SetValue(ref this._test, value); }
        }

        [PropertyExposed()]
        public StringComparison Comp
        {
            get { return this._comp; }
            private set { this.SetValue(ref this._comp, value); }
        }

        [PropertyExposed(SpecialKey = PropertyExposedAttribute.SpecialKeys.Percent)]
        public double Percent
        {
            get { return this._percent; }
            set { this.SetValue(ref this._percent, value); }
        }

        #endregion
    }
}
